<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>登录</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>
<!-- 你的 HTML 代码 -->
        <table id="loginInfo">

        </table>
<script src="/layui/layui.js"></script>
<script>
    layui.use(['table'], function(){
        var table = layui.table;

        table.render({
            elem: '#loginInfo'
            ,height: 472
            ,url: '/api/loginInfor/page' //数据接口
            ,page: true //开启分页
            ,cols: [[ //表头
                {field: 'id', title: 'ID',  sort: true, fixed: 'left'}
                ,{field: 'loginIp', title: '登录IP'}
                ,{field: 'loginBroswer', title: '登录客户端'}
                ,{field: 'loginAddress', title: '登陆地址'}
                ,{field: 'username', title: '用户名'}
                ,{field: 'description', title: '描述kz'}
                ,{field: 'createDatetime', title: '登录时间',  sort: true}
            ]]
            , response : {
                statusCode : 1
            }
            , parseData : function (res) {
                if (res.status == 1) {
                    return {
                        "code": res.status,
                        "msg": res.message,
                        "count": res.total,
                        "data": res.data
                    }
                }
            }

        });


    });
</script>

</body>
</html>